package com.dragon.modules.yuegou.query.park;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.park.CouponGrantEntity;
import com.dragon.modules.yuegou.enums.park.CouponGrantStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 停车券发放信息表 动态查询条件
 * 
 * @author px
 * @date 2019-04-18 10:10:03
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CouponGrantQuery extends CouponGrantEntity implements Query<CouponGrantEntity> {

    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 停车券与商户关系表id查询条件 */
	@JsonUnwrapped(prefix = "parkCouponMerchantId")
	private Condition<String> parkCouponMerchantIdCondition;

    /** 停车券id查询条件 */
	@JsonUnwrapped(prefix = "couponTemplate")
	private Condition<String> couponTemplateCondition;

    /** 停车券名字查询条件 */
	@JsonUnwrapped(prefix = "couponTemplateName")
	private Condition<String> couponTemplateNameCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 停车券与会员关系表id查询条件 */
	@JsonUnwrapped(prefix = "parkCouponMemberId")
	private Condition<String> parkCouponMemberIdCondition;

    /** 领取时间查询条件 */
	@JsonUnwrapped(prefix = "getTime")
	private Condition<LocalDateTime> getTimeCondition;

    /** 发放人查询条件 */
	@JsonUnwrapped(prefix = "grantBy")
	private Condition<String> grantByCondition;

    /** 发放时间查询条件 */
	@JsonUnwrapped(prefix = "grantTime")
	private Condition<LocalDateTime> grantTimeCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** [枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<CouponGrantStatus> statusCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CouponGrantQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CouponGrantQuery(CouponGrantEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CouponGrantQuery(CouponGrantQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.parkCouponMerchantIdCondition != null) {
			this.parkCouponMerchantIdCondition = other.parkCouponMerchantIdCondition.copy();
		}
		if(other.couponTemplateCondition != null) {
			this.couponTemplateCondition = other.couponTemplateCondition.copy();
		}
		if(other.couponTemplateNameCondition != null) {
			this.couponTemplateNameCondition = other.couponTemplateNameCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.parkCouponMemberIdCondition != null) {
			this.parkCouponMemberIdCondition = other.parkCouponMemberIdCondition.copy();
		}
		if(other.getTimeCondition != null) {
			this.getTimeCondition = other.getTimeCondition.copy();
		}
		if(other.grantByCondition != null) {
			this.grantByCondition = other.grantByCondition.copy();
		}
		if(other.grantTimeCondition != null) {
			this.grantTimeCondition = other.grantTimeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CouponGrantEntity> toQueryWrapper() {
		QueryWrapper<CouponGrantEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (parkCouponMerchantIdCondition != null) {
			parkCouponMerchantIdCondition.toWrapper(wrapper, COL_PARK_COUPON_MERCHANT_ID);
		}
		if (couponTemplateCondition != null) {
			couponTemplateCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE);
		}
		if (couponTemplateNameCondition != null) {
			couponTemplateNameCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE_NAME);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (parkCouponMemberIdCondition != null) {
			parkCouponMemberIdCondition.toWrapper(wrapper, COL_PARK_COUPON_MEMBER_ID);
		}
		if (getTimeCondition != null) {
			getTimeCondition.toWrapper(wrapper, COL_GET_TIME);
		}
		if (grantByCondition != null) {
			grantByCondition.toWrapper(wrapper, COL_GRANT_BY);
		}
		if (grantTimeCondition != null) {
			grantTimeCondition.toWrapper(wrapper, COL_GRANT_TIME);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回停车券与商户关系表id查询条件
	 * 
	 * @return parkCouponMerchantIdCondition 停车券与商户关系表id查询条件
	 */
	public Condition<String> parkCouponMerchantId() {
		this.parkCouponMerchantIdCondition = new Condition<>();
		return this.parkCouponMerchantIdCondition;
	}
	
	/**
	 * 获取停车券与商户关系表id查询条件
	 * 
	 * @return parkCouponMerchantIdCondition 停车券与商户关系表id查询条件
	 */
	public Condition<String> getParkCouponMerchantIdCondition() {
		return parkCouponMerchantIdCondition;
	}

	/**
	 * 设置停车券与商户关系表id查询条件
	 * 
	 * @param parkCouponMerchantIdCondition 停车券与商户关系表id查询条件
	 */
	public void setParkCouponMerchantIdCondition(Condition<String> parkCouponMerchantIdCondition) {
		this.parkCouponMerchantIdCondition = parkCouponMerchantIdCondition;
	}

	/**
	 * 构造并返回停车券id查询条件
	 * 
	 * @return couponTemplateCondition 停车券id查询条件
	 */
	public Condition<String> couponTemplate() {
		this.couponTemplateCondition = new Condition<>();
		return this.couponTemplateCondition;
	}
	
	/**
	 * 获取停车券id查询条件
	 * 
	 * @return couponTemplateCondition 停车券id查询条件
	 */
	public Condition<String> getCouponTemplateCondition() {
		return couponTemplateCondition;
	}

	/**
	 * 设置停车券id查询条件
	 * 
	 * @param couponTemplateCondition 停车券id查询条件
	 */
	public void setCouponTemplateCondition(Condition<String> couponTemplateCondition) {
		this.couponTemplateCondition = couponTemplateCondition;
	}

	/**
	 * 构造并返回停车券名字查询条件
	 * 
	 * @return couponTemplateNameCondition 停车券名字查询条件
	 */
	public Condition<String> couponTemplateName() {
		this.couponTemplateNameCondition = new Condition<>();
		return this.couponTemplateNameCondition;
	}
	
	/**
	 * 获取停车券名字查询条件
	 * 
	 * @return couponTemplateNameCondition 停车券名字查询条件
	 */
	public Condition<String> getCouponTemplateNameCondition() {
		return couponTemplateNameCondition;
	}

	/**
	 * 设置停车券名字查询条件
	 * 
	 * @param couponTemplateNameCondition 停车券名字查询条件
	 */
	public void setCouponTemplateNameCondition(Condition<String> couponTemplateNameCondition) {
		this.couponTemplateNameCondition = couponTemplateNameCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回停车券与会员关系表id查询条件
	 * 
	 * @return parkCouponMemberIdCondition 停车券与会员关系表id查询条件
	 */
	public Condition<String> parkCouponMemberId() {
		this.parkCouponMemberIdCondition = new Condition<>();
		return this.parkCouponMemberIdCondition;
	}
	
	/**
	 * 获取停车券与会员关系表id查询条件
	 * 
	 * @return parkCouponMemberIdCondition 停车券与会员关系表id查询条件
	 */
	public Condition<String> getParkCouponMemberIdCondition() {
		return parkCouponMemberIdCondition;
	}

	/**
	 * 设置停车券与会员关系表id查询条件
	 * 
	 * @param parkCouponMemberIdCondition 停车券与会员关系表id查询条件
	 */
	public void setParkCouponMemberIdCondition(Condition<String> parkCouponMemberIdCondition) {
		this.parkCouponMemberIdCondition = parkCouponMemberIdCondition;
	}

	/**
	 * 构造并返回领取时间查询条件
	 * 
	 * @return getTimeCondition 领取时间查询条件
	 */
	public Condition<LocalDateTime> getTime() {
		this.getTimeCondition = new Condition<>();
		return this.getTimeCondition;
	}
	
	/**
	 * 获取领取时间查询条件
	 * 
	 * @return getTimeCondition 领取时间查询条件
	 */
	public Condition<LocalDateTime> getGetTimeCondition() {
		return getTimeCondition;
	}

	/**
	 * 设置领取时间查询条件
	 * 
	 * @param getTimeCondition 领取时间查询条件
	 */
	public void setGetTimeCondition(Condition<LocalDateTime> getTimeCondition) {
		this.getTimeCondition = getTimeCondition;
	}

	/**
	 * 构造并返回发放人查询条件
	 * 
	 * @return grantByCondition 发放人查询条件
	 */
	public Condition<String> grantBy() {
		this.grantByCondition = new Condition<>();
		return this.grantByCondition;
	}
	
	/**
	 * 获取发放人查询条件
	 * 
	 * @return grantByCondition 发放人查询条件
	 */
	public Condition<String> getGrantByCondition() {
		return grantByCondition;
	}

	/**
	 * 设置发放人查询条件
	 * 
	 * @param grantByCondition 发放人查询条件
	 */
	public void setGrantByCondition(Condition<String> grantByCondition) {
		this.grantByCondition = grantByCondition;
	}

	/**
	 * 构造并返回发放时间查询条件
	 * 
	 * @return grantTimeCondition 发放时间查询条件
	 */
	public Condition<LocalDateTime> grantTime() {
		this.grantTimeCondition = new Condition<>();
		return this.grantTimeCondition;
	}
	
	/**
	 * 获取发放时间查询条件
	 * 
	 * @return grantTimeCondition 发放时间查询条件
	 */
	public Condition<LocalDateTime> getGrantTimeCondition() {
		return grantTimeCondition;
	}

	/**
	 * 设置发放时间查询条件
	 * 
	 * @param grantTimeCondition 发放时间查询条件
	 */
	public void setGrantTimeCondition(Condition<LocalDateTime> grantTimeCondition) {
		this.grantTimeCondition = grantTimeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回[枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件
	 * 
	 * @return statusCondition [枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件
	 */
	public Condition<CouponGrantStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件
	 * 
	 * @return statusCondition [枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件
	 */
	public Condition<CouponGrantStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件
	 * 
	 * @param statusCondition [枚举]活动状态：0-未领取-UNGET、1-已领取-GET查询条件
	 */
	public void setStatusCondition(Condition<CouponGrantStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

}
